﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DatabaseKeyControl.xaml.cs" company="Marcin Jastrzebski">
//   Copyright (c) Marcin Jastrzebski (marcin@marcinj.net)
// </copyright>
// <summary>
//   The database key control.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace mPassRT.Controls
{
    using mPassRT.ViewModels.Key;

    /// <summary>The database key control.</summary>
    public sealed partial class DatabaseKeyControl
    {
        #region Constructors and Destructors

        /// <summary>Initializes a new instance of the <see cref="DatabaseKeyControl"/> class.</summary>
        public DatabaseKeyControl()
        {
            this.InitializeComponent();
            this.DataContext = new DatabaseKeyViewModel();
        }

        #endregion

        #region Public Properties

        /// <summary>Gets or sets the commit button text.</summary>
        public string CommitButtonText
        {
            get
            {
                return this.ViewModel.CommitButtonText;
            }

            set
            {
                this.ViewModel.CommitButtonText = value;
            }
        }

        /// <summary>Gets or sets the title.</summary>
        public string Title
        {
            get
            {
                return this.ViewModel.Title;
            }

            set
            {
                this.ViewModel.Title = value;
            }
        }

        #endregion

        #region Properties

        /// <summary>Gets the view model.</summary>
        private DatabaseKeyViewModel ViewModel
        {
            get
            {
                return (DatabaseKeyViewModel)this.DataContext;
            }
        }

        #endregion
    }
}